<template>
    <div class="index">
      <el-card class="!border-none" shadow="never">
        <div class="gt-con-tit">
          <a href="javascript:void(0)">
            通知公告
          </a>
        </div>
        <ul class="gt-con-newslist">
          <li v-for="item in pager">
            <NuxtLink :to="`/notice/detail/${item.id}`">
              {{item.title}}
            </NuxtLink>
<!--            <a :href="'/notice/detail/'+item.id" target="_blank">{{item.title}}</a>-->
            <span>{{item.publishTime}}</span></li>
        </ul>
      </el-card>
    </div>
</template>
<script lang="ts" setup>
import { getNoticeList } from '@/api/notcie'

const queryParams = reactive({
    name: '',
    address: [] as any[],
    playTime: [] as any[],
    playType: '',
    schedule: '',
    orgParty: ''
})
const paramsInit: Record<any, any> = Object.assign({}, toRaw(queryParams))
const { data: pager,refresh } = await useAsyncData(() => getNoticeList({
            ...queryParams
        }),
{
    default: () => ({
      page: 1,
      size: 15,
      loading: false,
      count: 0,
      lists: [] as any[],
      extend: {} as Record<string, any>
    })
})
</script>
<style lang="scss" scoped>
.gt-con-tit {
  width: 100%;
  height: 47px;
  margin-bottom: 19px;
  border-bottom: 2px solid var(--el-color-primary);
}
.gt-con-tit a {
  display: inline-block;
  line-height: 46px;
  margin-left: 10px;
  color: #3269b8;
  font-size: 16px;
  vertical-align: middle;
}
.gt-con-newslist {
  margin-top: -8px;
}
.gt-con-newslist li {
  border-bottom: 1px dotted #cccccc;
  height: 40px;
  padding-left: 16px;
}
.gt-con-newslist li a {
  font-size: 16px;
  max-width: 800px;
  line-height: 40px;
  display: inline-block;
  padding-left: 15px;
  background: url('@/assets/images/gt-icon03.png') left center no-repeat;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  float: left;
}
.gt-con-newslist li span {
  float: right;
  color: #888888;
  font-size: 16px;
  line-height: 36px;
  margin-right: 6px;
}
</style>
